package com.asdhawaii.otello.players;

import com.asdhawaii.otello.board.Move;
import com.asdhawaii.otello.board.Square;
import com.asdhawaii.otello.board.SquareContents;
import java.util.List;

/**
 * An AI designed to play Otello.
 * 
 * @author Branden Ogata
 *
 */

public abstract class AbstractOtelloAi
{
  /**
   * The color of the pieces that this AI will play.
   * 
   */
  private SquareContents color;
  
  /**
   * Creates a new OtelloAi with the given color to play.
   * 
   * @param color The SquareContents indicating the color of pieces that the new OtelloAi will use.
   * 
   */
  
  public AbstractOtelloAi(SquareContents color)
  {
    this.color = color;
  }
  
  /**
   * Returns the color of the pieces for this OtelloAi.
   * 
   * @return this.color A SquareContents equal to the color of the pieces for this OtelloAi.
   * 
   */
  
  public SquareContents getColor()
  {
    return this.color;
  }
  
  /**
   * Sets the color of the pieces for this OtelloAi.
   * 
   * @param color The SquareContents indicating the color of the pieces this OtelloAi should play.
   * 
   */
  
  public void setColor(SquareContents color)
  {
    this.color = color;
  }
    
  /**
   * Returns the move that this OtelloAi will make given a board and a list of valid moves.
   * 
   * @param board The Square[][] representing the Otello board.
   * @param moves The List<Move> containing the valid moves for the given board.
   * 
   * @return selection A Move containing the coordinates of the square to place a piece on.
   * 
   */
  
  public abstract Move getMove(Square[][] board, List<Move> moves);  
}
